function alertFormMiscreant(people) {
    for (const p of people) {
        if (p === "Don") {
            setoffAlarms();
            return "Don";
        }
        if (p === "John") {
            setoffAlarms();
            return "John";
        }
    }
    return "";
}

const found = alertFormMiscreant(people);
/*************************************************** */
function alertFormMiscreant(people) {
    if (findMiscreant(people) != "") {
        setoffAlarms();
    }
}
function findMiscreant(people) {
    for (const p of people) {
        if (p === "Don") {
            return "Don";
        }
        if (p === "John") {
            return "John";
        }
    }
    return "";
}
const found2 = findMiscreant(people);
alertFormMiscreant(people);
